<template>
  <div class="wh" style="padding:0 20px;box-sizing: border-box">
    <el-form :model="form" label-width="auto" style="max-width: 600px">
      <el-row>
        <el-col :span="12">
          <el-form-item label="填充颜色">
            <el-color-picker v-model="form.color1" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="轮廓颜色">
            <el-color-picker v-model="form.color2" />
          </el-form-item>
        </el-col>
      </el-row>
      <el-form-item label="填充样式">
        <el-input v-model="form.desc" type="text" />
      </el-form-item>
      <el-form-item label="轮廓样式">
        <el-input v-model="form.desc" type="text" />
      </el-form-item>
      <el-form-item label="轮廓宽度">
        <el-input v-model="form.desc" type="text" />
      </el-form-item>
      <el-row>
        <el-col :span="8">
          <el-form-item label="第一批次">
            <el-checkbox value="Value 1" />
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="第二批次">
            <el-checkbox value="Value 1" />
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="第三批次">
            <el-checkbox value="Value 1" />
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="镶嵌线">
            <el-checkbox value="Value 1" />
          </el-form-item>
        </el-col>
      </el-row>
      <el-form-item label="不透明度">
        <el-slider v-model="form.slider" />
      </el-form-item>
      <el-form-item >
        <div class="btns" style="display: flex; width: 100%; justify-content: center">
          <el-button type="primary" @click="onSubmit">确定</el-button>
          <el-button>取消</el-button>
        </div>
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
// import ToolItem from '@/components/map/tools/ToolItem.vue'

import _ from 'lodash'

let pickEntity = null
export default {
  name: '',
  components: {
    // ToolItem,
  },
  data() {
    return {
      dck: [],
      treedata: [],
      defaultProps: {
        label: 'label'
      },
      tableData: [],
      iftree: false,
      form: {
        resource:''
      }
    }
  },
  computed: {

  },
  // inject: ['activeTool','activeToolParent'],
  watch: {
  },
  mounted() {
    this._layers = {}
    earth.sceneTree.root.children.map(item => {
      if (_.has(item, 'title') && item.title == '基础图层') {
        item.children.map(iitem => {

          this.treedata.push({
            label: iitem.czmObject.name,
            id: iitem.czmObject.xbsjGuid
          })
          this._layers[iitem.czmObject.xbsjGuid] = iitem
          if ((_.has(iitem.czmObject, 'enabled') && iitem.czmObject.enabled)) {
            this.dck.push(iitem.czmObject.xbsjGuid)
          }
        })

        setTimeout(() => {
          this.iftree = true
        }, 0);

      }
    })
  },
  beforeDestroy() {
    this._disposers.forEach(d => d());
    this._disposers.length = 0;
  },
  methods: {
    ncheck(a,b,c){
      if (b) {

        this._layers[a.id].enabled = true
      }else{
        this._layers[a.id].enabled = false

      }
    },
    qingkongclick() {

    },
    closewindow(){
      this.qingkongclick()
    }
  },
}
</script>

<style lang="scss">

.el-tree{
  background-color: #0000!important;
  color: white;
}

.wh{
  width: 100%;
  height: 100%;
}

</style>
